
module DailyProjectDetails
  def get_all_data
    return @data
  end
  
  def get_data(tool)
    filtered_data = Array.new
    for data in get_all_data
      if(data.get_value('Tool') == tool)
        filtered_data.push(data)
      end
    end
    return filtered_data
  end
  
  def get_tools
    tools = Hash.new
    for data in get_all_data
      tool = data.get_value('Tool')
      if(tools[tool] == nil)
        tools[tool] = ''
      end
    end
    return tools.keys
  end
  
  def get_data_count(key)
    data_count = 0 
    for data in self.get_all_data 
      data_count += String.new(data.get_value(key)).to_i 
    end 
    return data_count
  end
end
